the for in statement loops through the properties of an object.

for in over arrays : the for in statement can loops over array values:

array.foreach(): this method calls a function(a callback function) once for each element.